package com.example.seatastorage;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MoodAir
 */
@RestController
@RequiredArgsConstructor
public class StorageController {
    
    private final StorageService storageService;
    
    @GetMapping("/deduct")
    public Boolean deduct(@RequestParam Long productId, @RequestParam Integer count) {
        storageService.deduct(productId, count);
        return true;
    }
}